package vn.vfriends.payment.jpa.entity;

import java.io.Serializable;
import javax.persistence.*;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;

/**
 *
 * @author tuan@vfriends.vn
 */
@Entity
@NamedQueries({
    @NamedQuery(name = "Account.findAccountByCif", query = "SELECT a FROM Account a WHERE a.cif = :cif")})
public class Account implements Serializable {

    public static final int BASE_CIF = 100000;
    
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(nullable = false)
    private Long id;
    
    @Size(max=6)
    @Column(length=6, nullable=false, unique=true)
    private String cif;
    
    private Long balance;

    public Long getBalance() {
        return balance;
    }

    public void setBalance(Long balance) {
        this.balance = balance;
    }

    public String getCif() {
        return cif;
    }

    public void setCif(String cif) {
        this.cif = cif;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
}
